// let uid = localStorage.getItem("uid");
// 1-加载商品列表
// let uid = "54709";
let pagenum = 0;
let pagesize = 8;
async function loadList() {
  let uid = "54709";
  let params = { pagenum, pagesize, uid };
  let res = await axios.get(allProductListApi, { params });
  // console.log(res.data.data);
  let html = "";
  res.data.data.forEach((v) => {
    html += `
            <li class="floor_goods_list_li">
                <a href="item.html?id=${v.pid}">
                    <div class="pimg">
                        <img src="${v.pimg}" width="160" height="160">
                    </div>
                    <h3 class="pname">${v.pname}</h3>
                    <p class="pdesc">${v.pdesc}</p>
                    <p class="pprice">${v.pprice}元起</p>
                </a>
            </li>`;
  });
  $(".floor_goods_list").html(html);
}
async function loadList1() {
  let uid = "54709";
  let pagenum = 0;
  let params = { pagenum, pagesize, uid };
  let res = await axios.get(allProductListApi, { params });
  // console.log(res.data.data);
  let html = "";
  res.data.data.forEach((v) => {
    html += `
            <li class="floor_goods_list_li">
                <a href="item.html?id=${v.pid}">
                    <div class="pimg">
                        <img src="${v.pimg}" width="160" height="160">
                    </div>
                    <h3 class="pname">${v.pname}</h3>
                    <p class="pdesc">${v.pdesc}</p>
                    <p class="pprice">${v.pprice}元起</p>
                </a>
            </li>`;
  });
  $(".floor_goods_list2").html(html);
}